package com.hhhn.wk.widget.dialog;


import android.app.Dialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;

import com.hhhn.wk.R;

/**
 * * * * * * * * * * * *
 * @author：WenKe ｡◕‿◕｡ *
 * Data：2017     ｡◕‿◕｡ *
 * QQ：370820580  ｡◕‿◕｡ *
 * Function：     ｡◕‿◕｡ *
 *
 * * * * * * * * * * * */
public class LoadDialog extends Dialog {
    public LoadDialog(Context context, int theme) {
        super(context, theme);
    }
    /**
     * Helper class for creating a custom dialog
     */
    public static class Builder {

        private Context context;

        private  View layout;
        public Builder(Context context) {
            this.context = context;
        }

        /**
         * Create the custom dialog
         */
        public LoadDialog create() {
            LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            // instantiate the dialog with the custom Theme
            final LoadDialog dialog = new LoadDialog(context, R.style.paypwdStyle);
            dialog.setCanceledOnTouchOutside(false);
            layout = inflater.inflate(R.layout.dialog_loading, null);
            dialog.addContentView(layout, new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
            dialog.setContentView(layout);
            return dialog;
        }

    }

}
